//
//  Common.h
//  Common
//
//  Created by IT.Bear on 16/4/5.
//  Copyright © 2016年 IT.Bear. All rights reserved.
//


#ifndef Common_h

#import "FFURLManager.h"

#define Common_h

#pragma mark - 后端服务器地址
/*!
 *  App内部版本号
 */
#define APPVERSION [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]

/*!
 *  App发布版本号
 */
#define APPOUTVERSION [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"]

//==================================================================
#pragma mark - 正式发布版本时请使用生产服务器
/*!
 * 服务器类型 1:测试 2:开发 3:线上
 */

#define CURRENT_SERVER_TYPE 3

//==================================================================

#if CURRENT_SERVER_TYPE == 1

#define DEBUG  1
#define Main_Service @"http://172.16.8.147:9998/buyer/" //测试本地用

#define JMessageServiceAcount @"zjm_57"

//测试环境1
#define WEBURL @"http://172.16.8.147:8089" //大雄电脑

//#define WEBURL @"http://172.16.8.121:8091"  //胜波电脑

/**
 * !!!!!! TEST 打开允许app内部切换环境 ！线上环境一定要屏蔽
 
 */
#define TEST
//==================================================================

#elif CURRENT_SERVER_TYPE == 2

#define Main_Service @"http://172.16.8.147:9998/buyer/" //

#define JMessageServiceAcount @"zjm_57"

//测试环境2
#define WEBURL @"http://172.16.8.147:8089"

/**
 * !!!!!! TEST 打开允许app内部切换环境 ！线上环境一定要屏蔽
 */
#define TEST
//==================================================================

#else 

#define Main_Service @"http://www.fashionfinger.com:10119/buyer/" // For 生产（正式）

#define JMessageServiceAcount @"fashionFinger"

#define WEBURL @"http://chat.fashionfinger.com:8089"

#endif

//==================================================================

//下载图片URL
#define LOAD_IMAGE(imageUrl)       [NSURL URLWithString:imageUrl]

#ifdef TEST
#define MAIN_SERVER(strAppend)     [NSString stringWithFormat:@"%@%@",SERVER_URL,strAppend]
#else
#define MAIN_SERVER(strAppend)     [NSString stringWithFormat:@"%@%@",Main_Service,strAppend]
#endif
//==================================================================

#if CURRENT_SERVER_TYPE <= 2 //开发或测试环境
#define EASEMO_CERTNAME @"fenkeDevPush"
#define UNIONPAYMODE @"01"

#else //正式
#define EASEMO_CERTNAME @"fenkeDistPush"
#define UNIONPAYMODE @"00"

#endif

#define DES_KEY  @"f20f883e"
#define DES_IV  @"e10adc39"

#ifdef CURRENT_SERVER_TYPE
#define LOG(...) NSLog(__VA_ARGS__);
#define LOG_METHOD NSLog(@"%s", __func__);
#else
#define LOG(...); #define LOG_METHOD;
#endif


#endif /* Common_h */
